package com.zefor.utils;

import kd.bos.cache.CacheConfigInfo;
import kd.bos.cache.CacheFactory;
import kd.bos.cache.LocalMemoryCache;

public class CacheUtil {
    private static LocalMemoryCache localCache = null;
    public static LocalMemoryCache getCache(){
        if (localCache != null) {
            return localCache;
        }
        //本地缓存
        CacheConfigInfo localConfig = new CacheConfigInfo();
        localConfig.setMaxItemSize(5000);
        localConfig.setTimeout(600);
        localCache = CacheFactory.getCommonCacheFactory().$getOrCreateLocalMemoryCache("fi_region", "basedata", localConfig);
        return localCache;
    }

}
